<!DOCTYPE html>
<style>
  ul { text-align: center }
  ul.left { text-align: left }
</style>
<ul id="uList">
  <li>This text should not be centered</li>
</ul>
<script>
  uList.offsetTop;
  uList.className = "left";
</script>
